import { Component, OnInit,Input,EventEmitter, Output,Host,Inject,forwardRef ,ViewChild ,ElementRef,AfterViewInit } from '@angular/core';

import { RoleComponent ,roleDetailsDatatype} from '../role.component';
import{ Service } from '../../../server/server';

@Component({
  selector: 'app-role-details',
  templateUrl: './role-details.component.html',
})



export class RoleDetailsComponent implements OnInit {

  @Input() roledatas : roleDetailsDatatype;

  @Input() roleslistdatas :  roleDetailsDatatype;

  constructor(private server :Service) {
    //接受角色组数据
    this.rolesdataeeventEmit = this.server.rolesdataeeventEmit.subscribe((value: any) => {
      this.roleslistdatas = value;
    });
  }

  //取消订阅
  public rolesdataeeventEmit: any;
  ngOnDestroy() {
    if (this.rolesdataeeventEmit ) {
      this.rolesdataeeventEmit.unsubscribe();
    }
  }

  ngOnInit() {
    
  }
  
}


